<?php

// 添加
$router->post('/create', 'PromotionController@create');
// 删除
$router->get('/delete/{id:[0-9]+}', 'PromotionController@delete');
// 修改
$router->post('/edit/{id:[0-9]+}', 'PromotionController@edit');
// 查询
$router->get('/index/{id:[0-9]+}', 'PromotionController@index');
// 查询
$router->get('/lists/{shop_id:[\w]+}/{page:[0-9]+}', 'PromotionController@lists');

$router->get('/plantoken/{plan_token:[\w]+}', 'PromotionController@planToken');

/*----------------------------------------------------------------------*/
// 推广团队(商户)
$router->get('/shop/team/{shop_id:[0-9]+}/{page:[0-9]+}', 'PromotionController@shopTeam');
// 推广详情(商户)
$router->get('/shop/details/{shop_id:[0-9]+}/{user_id:[0-9]+}/{plan_id:[0-9]+}/{page:[0-9]+}', 'PromotionController@shopDetails');
/*----------------------------------------------------------------------*/
// 是否加入该计划(用户)
$router->get('/plan/status/{user_id:[0-9]+}/{plan_token:[\w]+}', 'PromotionController@statusPlan');
// 绑定关系(用户)
$router->post('/relation/build', 'PromotionController@buildRelation');
// 加入计划(用户)
$router->post('/plan/join', 'PromotionController@joinPlan');
// 离开计划(用户)
$router->post('/plan/leave', 'PromotionController@leavePlan');
// 推广计划(用户)
$router->get('/user/plans/{user_id:[0-9]+}/{page:[0-9]+}', 'PromotionController@userPlans');
// 收益(用户)
$router->get('/user/profit/{user_id:[0-9]+}', 'PromotionController@userProfit');
// 团队(用户)
$router->get('/user/team/{user_id:[0-9]+}/{page:[0-9]+}', 'PromotionController@userTeam');
// 提现详情(用户)
$router->get('/user/withdrawals/details/{user_id:[0-9]+}/{page:[0-9]+}', 'PromotionController@userWithdrawalsDetails');
// 收益详情(用户)
$router->get('/user/details/{user_id:[0-9]+}/{page:[0-9]+}', 'PromotionController@userDetails');
/*----------------------------------------------------------------------*/
// 推广分佣订单入口
$router->post('/entrance', 'PromotionController@entrance');
